<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>校园宿舍管理系统</title>
<link href="${path }/css/style.css" 
	rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="${path }/js/checkForm.js" 
	charset="gb2312"></script>
<meta http-equiv="Content-Type" 
	content="text/html;charset=gb2312"/>
</head>

<body>
<center>
<table class="out">
<tr>
    <td class="title">校园宿舍管理系统</td>
</tr>
<tr>
    <td class="subtitle">&nbsp;</td>
</tr>
<tr>
    <td class="content">
    <table class="out">
    <tr>
        <td class="left" >
        	<%@ include file="left.jsp"%>
     	</td>
     	
        <td class="right">
        <table class="rightTable"> 
        <tr>
          	<td class="mainMenu">宿舍楼管理员设置</td>
        </tr>
        <tr>
            <td class="rightout">
            <form name="form1" onsubmit="return checkBuildingAdmin()"
            	action="addBuildingAdmin.do" method="post" >
            <input name="bId" value="${building.id }" type="hidden">
            <table class="fullTable">
            <tr>
              	<td class="navi"> 
              		功能导航： <a href="buildingManager.do">返回上层</a></td>
              	<td width="58%">添加管理员：
                	<select name="tId">
               		<option value="">请选择</option>
               		<c:forEach items="${freeTeacherList }" var="teacher">
               		<option value="${teacher.id }">${teacher.name }</option>
               		</c:forEach>
                	</select>
                <input type="submit"value="点击添加">               
            </tr>
            </table>
            </form>
            
            <table class="fullTable">
            <tr class="dataTitleTr">
               <th>姓名</th>
               <th>性别</th>
               <th>电话</th>
               <th>用户名</th>
               <th>操作</th>
            </tr>
            <c:forEach items="${adminTeacherList }" var="teacher">
            <tr class="dataTr">
               	<td>${teacher.name}</td>
               	<td>${teacher.sex}</td>
               	<td>${teacher.tel}</td>
               	<td align="center">${teacher.username}</td>
               	<td align="center">
               		<a href="deleteBuildingAdmin.do?bId=${building.id }&tId=${teacher.id}" 
               			onClick="return confirm('确定要将该管理员从该宿舍楼移除吗？')">移除</a></td>
            </tr>
            </c:forEach>              
            </table>            
            </td>
        </tr>
        </table>
        </td>
    </tr>
    </table>
    </td>
</tr>
<tr>
    <td class="bottom">&nbsp;</td>
</tr>
</table>

</center>
</body>
</html>